package clas.ac.cn.common.vo;

import lombok.AllArgsConstructor;

/**
 * @author zhangzhang
 */

@AllArgsConstructor
public enum ErrMessage {
    /*
     *
     */

    ACCIDENT_ERROR(-1, "服务器抛出了一个错误"),
    ERROR(999, "请求错误"),
    UNAUTHENTICATED(401, "请先通过身份认证"),
    AUTH_FAIL(1400, "认证失败"),
    NOT_FOUND(1404,"这是一片没有数据的荒野"),
    TOKEN_PAST(1401, "身份过期，请求重新登录"),
    REQUEST_DATA_ERR(1501,"请求参数错误"),
    TOKEN_ERROR(1402, "令牌错误"),
    HEAD_ERROR(1403, "请求头错误"),
    AUTH_USERNAME_NONE(1405, "用户名不能为空"),
    AUTH_PASSWORD_NONE(1406, "密码不能为空"),
    ACCESS_DENIED(1500,"禁止访问"),
    MENU_NO(1306,"无此权限，请联系管理员"),
    REFRESH_ERROR(3001,"令牌刷新错误"),
    LOGIN_FAIL(1400, "账号或者密码错误"),

    CLIENT_ERROR(1200,"client信息错误");
    private String message;
    private Integer code;

    ErrMessage(Integer code, String message) {
        this.message = message;
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }
}
